#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author:lewsan

import pika
import sys

connection=pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel=connection.channel()

channel.exchange_declare(exchange='logs',
                         type='fanout')
message=' '.join(sys.argv[1]) or "info:Hello RabbitMq"

